Skip to content

feat(ffi): expose API for RDCleanPath #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

irvingoujAtDevolution
Copy link
Contributor

@irvingoujAtDevolution irvingoujAtDevolution commented Jul 3, 2025

Expose RDCleanPath via FFI, enable IronRDP .NET connections via RDCleanPath.

Issue: ARC-310

@irvingoujAtDevolution irvingoujAtDevolution marked this pull request as ready for review July 3, 2025 19:04
Copy link
Contributor Author

@irvingoujAtDevolution irvingoujAtDevolution Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we make this file ignored

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a VS Code file? Sure, we can ignore that. Note that you can locally decide what to ignore using the $GIT_DIR/info/exclude file. It’s the same format as gitignore.

@CBenoit
Copy link
Member

CBenoit commented Jul 4, 2025

Please, fix the errors reported by the CI

Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through it!

Comment on lines +40 to +44
if (count == 0)
{
// Note: this is particularly important, if we send a zero-length frame,
// somehow Gateway will raise TLS issue during the proxy.
return; // Nothing to write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I’m not sure why you get a TLS issue at this point, since you are supposed to have an already established TLS connection at this point, but SendAsync with an empty ArraySegment will result in a WebSocket frame to be send. A "Binary" frame that contains an empty byte array.

Comment on lines 54 to 56
public override void Flush()
{
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Nothing to do here? Could you add a comment explaining why?

Copy link
Contributor Author

@irvingoujAtDevolution irvingoujAtDevolution Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flush is never called as well, I'm not an expert in C# but I think there's some related to the "can seek" property. However, since this does not block us in any meaningful way, I;ll just leave a comment.

Copy link
Member

@CBenoit CBenoit Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flush is something that the consumer may call himself, in this case, us. It’s supposed to flush the write buffer, and immediately send the contents on the wire. Maybe it’s not required for ClientWebSocket because it already flushes before completing future returned by SendAsync, etc functions. The tungstenite library for Rust does expose a flush function, but it’s not the case for the C# class found in the standard library.

@CBenoit CBenoit changed the title feat(ffi): add Gateway websocket connection support feat(ffi): add support for RDCleanPath Jul 4, 2025
@CBenoit CBenoit changed the title feat(ffi): add support for RDCleanPath feat(ffi): expose API for RDCleanPath Jul 4, 2025
@CBenoit
Copy link
Member

CBenoit commented Jul 4, 2025

Also, ideally I would like two PRs:

  • One dedicated to exposing the RDCleanPath API, and
  • One dedicated to adding the WebSocket helper in the .NET library.

Copy link

github-actions bot commented Jul 5, 2025

Coverage Report 🤖 ⚙️

Past:
Total lines: 28177
Covered lines: 17394 (61.73%)

New:
Total lines: 28177
Covered lines: 17389 (61.71%)

Diff: -0.02%

[this comment will be updated automatically]

@irvingoujAtDevolution
Copy link
Contributor Author

Also, ideally I would like two PRs:

* One dedicated to exposing the RDCleanPath API, and

* One dedicated to adding the WebSocket helper in the .NET library.

I created this one dedicated for FFI changes, after it's merged I can rebase current PR to master, because the changes in FFI source would not compile without generated C# code.
#864

@CBenoit
Copy link
Member

CBenoit commented Jul 9, 2025

Also, ideally I would like two PRs:

* One dedicated to exposing the RDCleanPath API, and
* One dedicated to adding the WebSocket helper in the .NET library.

I created this one dedicated for FFI changes, after it's merged I can rebase current PR to master, because the changes in FFI source would not compile without generated C# code.

#864

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants